package com.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 促销活动 抽象促销活动 具体有直接打折类型促销 与满减促销
 * @author HeLiwei
 * 2023年9月4日
 */
public abstract class Promotion {
	
	/**
	 * 活动开始日期
	 */
	private Date beginDate;
	
	/**
	 * 活动结束日期
	 */
	private Date endDate;
	
	/**
	 * 活动名称
	 */
	private String name;
	
	/**
	 * 适用商品列表
	 */
	private List<Product> productList;
	
	/**
	 * 计算优惠金额
	 * @param totalPrice
	 * @return
	 */
	public abstract BigDecimal getDeductPrice(Order order);
	
	public Promotion() {}
	
	public Promotion(Date beginDate, Date endDate, String name) {
		super();
		this.beginDate = beginDate;
		this.endDate = endDate;
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public List<Product> getProductList() {
		return productList;
	}

	public void setProductList(List<Product> productList) {
		this.productList = productList;
	}

}
